package Cinema.DataLayer;

import java.util.ArrayList;
import Cinema.User;
import Cinema.CinemaEntities.Movie;
import Cinema.CinemaEntities.Site;
import Exceptions.DataAccessException;


/**
 * Interface that defines the way to save and to load system data to/from external sources
 * @author Fuchtzeinsoft Team
 *
 */
public interface IDataBackup {

	/**
	 * saves site list to external source
	 * @param sites - the list of sites
	 */
	public void saveSites(ArrayList<Site> sites);

	/**
	 * saves user list to external source
	 * @param users - the list of users
	 */
	public void saveUsers(ArrayList<User> users);

	/**
	 * saves movie list to external source
	 * @param movies - the list of movies
	 */
	public void saveMovies(ArrayList<Movie> movies);

	/**
	 * gets system data from external source
	 * @param isRestoring - determine if we need to take from initial source or from backup
	 * @return - DataPackage - all the data in one united package
	 */
	public  DataPackage getCinemaData(boolean isRestoring)  throws DataAccessException;

}
